<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<!-- 
	<%
		//request对象的使用

		String str1 = "xiaoming";
		//request.getAttribute
		//是传值
		request.setAttribute("strName", str1);
	%>
	<%
		out.print(request.getAttribute("strName"));
		out.print(str1);
	%>
 -->
	<%
	    //HTTP将request进行包装  传送
	
		//设置request对象的编码格式和客户端页面保持一致（解决中文乱码）
		request.setCharacterEncoding("utf-8");
		//前表单空间的name属性的值
		out.print("表单中Name值为：" + request.getParameter("txtName")+"<br>");
		//request.getParameter  
		//获取表单数据
		out.write("表单中Psw值为："+request.getParameter("txtPsw").toString()+"<br>");

		//request生命周期   
		//起点是    客户端   终点是   服务器

		
		
		//获取多元素控件(兴趣)
		//getParameterValues
		//获取数组
		String[] strVals = request.getParameterValues("chHobby");
		//获取value内容
		for (String str : strVals) {
			out.write(str + "<br/>");
		}
	%>
</body>
</html>